package gemini.castor.ui.client.mvp.single;

import gemini.castor.ui.client.mvp.event.LocalEventBus;
import ch.elca.gwt.mvp.client.EventBus;
import ch.elca.gwt.mvp.client.place.PlaceRequest;
import ch.elca.gwt.mvp.client.widget.DefaultWidgetPresenter;
import ch.elca.gwt.mvp.client.widget.WidgetDisplay;

public abstract class CastorWidgetPresenter<D extends WidgetDisplay> extends
		DefaultWidgetPresenter<D> {

	public CastorWidgetPresenter(final D display, final EventBus globalEventBus) {
		super(display, globalEventBus);
		localEventBus = null;
	}
	
	protected LocalEventBus localEventBus;
	
	public void setLocalEventBus(final LocalEventBus localEventBus){
		this.localEventBus = localEventBus;
	}
	
	public EventBus getLocalEventBus() {
		return localEventBus;
	}

	/**
	 * Returns the global event bus which handles external events.
	 *
	 * @return
	 */
	public EventBus getGlobalEventBus() {
		return eventBus;
	}

	@Override
	public void onPlaceRequest(final PlaceRequest request) {
		super.onPlaceRequest(request);
	}

	public void setInputObject(Object object) {
	}

	public Object getOutputObject() {
		return null;
	}

}
